<?php
/**
 * Eka Framework 0.3.0
 *
 * @copyright Copyright (c) 2008 Alexey Yu. Chuprina <656b61@gmail.com> (http://php-eka.googlecode.com)
 * @license http://www.opensource.org/licenses/mit-license.php MIT License
 *
 * @version $Id$
 */

require_once 'Eka/Db/Exception.php';

/**
 * Eka_Db_Adapter_Exception
 *
 * @package Db
 * @subpackage Adapter
 */
class Eka_Db_Adapter_Exception extends Eka_Db_Exception
{
	protected $chainedException = null;

	public function __construct($message = null, Exception $e = null)
	{
		if ($e) {
			$this->chainedException = $e;
			$this->code = $e->getCode();
		}
		parent::__construct($message);
	}

	public function getChainedException()
	{
		return $this->chainedException;
	}
}